"""
URL configuration for djangoProject_02 project.

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/4.2/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path
from webapp.views import depart, user, mobile, admin,login

urlpatterns = [
    # path('admin/', admin.site.urls),

    # 部门表相关操作（增删改查）
    path('depart/add/', depart.depart_add),
    path('depart/delete/', depart.depart_delete),
    path('depart/update/', depart.depart_update),
    path('depart/list/', depart.depart_list),

    # 员工表相关操作（增删改查）
    path('user/add/', user.user_add),
    path('user/model/form/add/', user.user_model_form_add),
    path('user/<nid>/delete/', user.user_delete),
    path('user/<nid>/update/', user.user_update),
    path('user/list/', user.user_list),

    # 靓号相关操作
    path('mobile/list/', mobile.mobile_list),
    path('mobile/add/', mobile.mobile_add),
    path('mobile/<int:nid>/delete/', mobile.mobile_delete),
    path('mobile/<int:nid>/edit/', mobile.mobile_edit),

    # 管理员相关操作
    path('admin/list/', admin.admin_list),
    path('admin/add/', admin.admin_add),
    path('admin/<int:nid>/edit/', admin.admin_edit),
    path('admin/<int:nid>/delete/', admin.admin_delete),

    # 登录相关
    path('login/', login.login),
    path('logout/', login.logout),
]
